package by.ostrovsky.webhousingsystem.hibernate.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import by.ostrovsky.webhousingsystem.hibernate.entity.common.Common;

@Entity
@Table(name = "employee")
public class Employee extends Common<Long>{
	@Id
	@Column(name = "EMPLOYEE_ID")
	private Long id;
	@Column(name = "EMPLOYEE_SPECIALITY")
	private String speciality;
	@Column(name = "EMPLOYEE_ISMASTER")
	private Boolean isMaster;
	@Column(name = "EMPLOYEE_ISBUSY")
	private Boolean isBusy;
	@Column(name = "EMPLOYEE_FREEAT")
	@Temporal(value = TemporalType.DATE)
	private Date freeAt;
	@Column(name = "EMPLOYEE_NAME")
	private String name;
	@Column(name = "EMPLOYEE_SURNAME")
	private String surname;
	@ManyToOne
	@JoinColumn(name = "TASKGROUP_ID")
	private TaskGroup taskGroup;

	public Employee() {
	}

	@Override
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getSpeciality() {
		return speciality;
	}

	public void setSpeciality(String speciality) {
		this.speciality = speciality;
	}

	public Boolean getIsMaster() {
		return isMaster;
	}

	public void setIsMaster(Boolean isMaster) {
		this.isMaster = isMaster;
	}

	public Boolean getIsBusy() {
		return isBusy;
	}

	public void setIsBusy(Boolean isBusy) {
		this.isBusy = isBusy;
	}

	public Date getFreeAt() {
		return freeAt;
	}

	public void setFreeAt(Date freeAt) {
		this.freeAt = freeAt;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public TaskGroup getTaskGroup() {
		return taskGroup;
	}

	public void setTaskGroup(TaskGroup taskGroup) {
		this.taskGroup = taskGroup;
	}
}
